home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-11 / rlib.zip / RL_FORGE.PRG < prev    next >
Text File  |  1993-01-04  |  850b  |  33 lines

  1. * Function: FORGET
  2. * Author..: Richard Low
  3. * Syntax..: FORGET()
  4. * Notes...: Procedure to release all memory variables created with MEMORIZE
  5.  
  6.  
  7. FUNCTION FORGET
  8. PARAMETERS p_first, p_last
  9. PRIVATE f_x, f_field
  10.  
  11. *-- if no fields in database or no file is open
  12. IF FCOUNT() = 0
  13.    *-- bomb out
  14.    RETURN .F.
  15. ENDIF
  16.  
  17. *-- see if they want a blank record (if parm is logical true) default = No
  18. p_blank = IF( TYPE('p_blank') = 'L', p_blank, .F. )
  19.  
  20. *-- see if they specified a starting field number, default to 1st field
  21. p_first = IF( TYPE('p_first') = 'N', p_first, 1 )
  22.  
  23. *-- see if they specified an ending field number, default to last field
  24. p_last = IF( TYPE('p_last') = 'N', p_last, FCOUNT() )
  25.  
  26. *-- go thru all fields in database
  27. FOR f_x = p_first TO p_last
  28.    f_field = FIELD(f_x)
  29.    RELEASE M->&f_field
  30. NEXT f_x
  31.  
  32. RETURN .T.
  33.